home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / QuickTime™ 3.0b11 / QTPublicInterfaces / CIncludes / TSMTE.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-12  |  3.4 KB  |  129 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        TSMTE.h
  3.  
  4.      Contains:    Text Services Managerfor TextEdit Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0 Beta
  8.  
  9.      Copyright:    ©1991-1997 Apple Technology, Inc. All rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __TSMTE__
  19. #define __TSMTE__
  20.  
  21. #ifndef __TEXTEDIT__
  22. #include <TextEdit.h>
  23. #endif
  24. #ifndef __DIALOGS__
  25. #include <Dialogs.h>
  26. #endif
  27. #ifndef __APPLEEVENTS__
  28. #include <AppleEvents.h>
  29. #endif
  30. #ifndef __TEXTSERVICES__
  31. #include <TextServices.h>
  32. #endif
  33.  
  34.  
  35.  
  36. #if PRAGMA_ONCE
  37. #pragma once
  38. #endif
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #if PRAGMA_IMPORT
  45. #pragma import on
  46. #endif
  47.  
  48. #if PRAGMA_STRUCT_ALIGN
  49.     #pragma options align=mac68k
  50. #elif PRAGMA_STRUCT_PACKPUSH
  51.     #pragma pack(push, 2)
  52. #elif PRAGMA_STRUCT_PACK
  53.     #pragma pack(2)
  54. #endif
  55.  
  56. /* signature, interface types*/
  57.  
  58. enum {
  59.     kTSMTESignature                = FOUR_CHAR_CODE('tmTE'),
  60.     kTSMTEInterfaceType            = FOUR_CHAR_CODE('tmTE'),
  61.     kTSMTEDialog                = FOUR_CHAR_CODE('tmDI')
  62. };
  63.  
  64.  
  65. /* update flag for TSMTERec*/
  66.  
  67. enum {
  68.     kTSMTEAutoScroll            = 1
  69. };
  70.  
  71.  
  72. /* callback procedure definitions*/
  73.  
  74. typedef CALLBACK_API( void , TSMTEPreUpdateProcPtr )(TEHandle textH, long refCon);
  75. typedef CALLBACK_API( void , TSMTEPostUpdateProcPtr )(TEHandle textH, long fixLen, long inputAreaStart, long inputAreaEnd, long pinStart, long pinEnd, long refCon);
  76. typedef STACK_UPP_TYPE(TSMTEPreUpdateProcPtr)                     TSMTEPreUpdateUPP;
  77. typedef STACK_UPP_TYPE(TSMTEPostUpdateProcPtr)                     TSMTEPostUpdateUPP;
  78.  
  79.  
  80. /* data types*/
  81.  
  82. struct TSMTERec {
  83.     TEHandle                         textH;
  84.     TSMTEPreUpdateUPP                 preUpdateProc;
  85.     TSMTEPostUpdateUPP                 postUpdateProc;
  86.     long                             updateFlag;
  87.     long                             refCon;
  88. };
  89. typedef struct TSMTERec                    TSMTERec;
  90. typedef TSMTERec *                        TSMTERecPtr;
  91. typedef TSMTERecPtr *                    TSMTERecHandle;
  92.  
  93. struct TSMDialogRecord {
  94.     DialogRecord                     fDialog;
  95.     TSMDocumentID                     fDocID;
  96.     TSMTERecHandle                     fTSMTERecH;
  97.     long                             fTSMTERsvd[3];                /* reserved*/
  98. };
  99. typedef struct TSMDialogRecord            TSMDialogRecord;
  100.  
  101. typedef TSMDialogRecord *                TSMDialogPeek;
  102. enum { uppTSMTEPreUpdateProcInfo = 0x000003C0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes) */
  103. enum { uppTSMTEPostUpdateProcInfo = 0x000FFFC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  104. #define NewTSMTEPreUpdateProc(userRoutine)                         (TSMTEPreUpdateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTSMTEPreUpdateProcInfo, GetCurrentArchitecture())
  105. #define NewTSMTEPostUpdateProc(userRoutine)                     (TSMTEPostUpdateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTSMTEPostUpdateProcInfo, GetCurrentArchitecture())
  106. #define CallTSMTEPreUpdateProc(userRoutine, textH, refCon)         CALL_TWO_PARAMETER_UPP((userRoutine), uppTSMTEPreUpdateProcInfo, (textH), (refCon))
  107. #define CallTSMTEPostUpdateProc(userRoutine, textH, fixLen, inputAreaStart, inputAreaEnd, pinStart, pinEnd, refCon)  CALL_SEVEN_PARAMETER_UPP((userRoutine), uppTSMTEPostUpdateProcInfo, (textH), (fixLen), (inputAreaStart), (inputAreaEnd), (pinStart), (pinEnd), (refCon))
  108.  
  109. #if PRAGMA_STRUCT_ALIGN
  110.     #pragma options align=reset
  111. #elif PRAGMA_STRUCT_PACKPUSH
  112.     #pragma pack(pop)
  113. #elif PRAGMA_STRUCT_PACK
  114.     #pragma pack()
  115. #endif
  116.  
  117. #ifdef PRAGMA_IMPORT_OFF
  118. #pragma import off
  119. #elif PRAGMA_IMPORT
  120. #pragma import reset
  121. #endif
  122.  
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126.  
  127. #endif /* __TSMTE__ */
  128.  
  129.